<template>
	<view>
		<view class="container">
			<view class="post-box">
				<image :data-url="'/subPages/tourgoodsDetail/tourgoodsDetail?id=' + goodsList[0].id" class="post"
					:src="goodsList[0].mian_photo" mode="widthFix"></image>
			</view>

			<view class="ad">
				明德励志 游学服务
			</view>

		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				goodsList: [], //商品列表
			}
		},

		onLoad() {

		},

		onShow() {
			this.gettourgoods();
		},

		methods: {

			async gettourgoods() {
				let res = await this.$api.gettourgoods({});
				console.log(res);
				this.goodsList = res.data;
			},

			// 页面跳转
			navigateTo(e) {
				wx.navigateTo({
					url: e.currentTarget.dataset.url
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
	.container {
		.post-box {
			margin-top: 0rpx;

			.post {
				width: 100%;
			}
		}

		.ad {
			line-height: 80rpx;
			text-align: center;
			font-size: 28rpx;
			margin: 30rpx 0;
			color: #666;
		}

	}
</style>